package com.tgy.reflection;

import java.lang.annotation.ElementType;

/***
 * @ClassName: AllClass
 * @Description: 测试所有类型的Class
 * @Auther: 送一一块二向箔
 * @Date: 15:10 2021/12/1
 * @version : V1.0
 */
public class AllClass {
    public static void main(String[] args) {
        //类
        Class c1 = Object.class;
        //interface 接口
        Class c2 = Comparable.class;
        //一维数组
        Class c3 = String[].class;
        //二维数组
        Class c4 = int[][].class;
        //注解
        Class c5 = Override.class;
        //枚举类型
        Class c6 = ElementType.class;
        //基本数据类型
        Class c7 = Integer.class;
        //Void
        Class c8 = Void.class;
        //Class
        Class c9 = Class.class;

        //按住alt 可以竖向复制多行

        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
        System.out.println(c5);
        System.out.println(c6);
        System.out.println(c7);
        System.out.println(c8);
        System.out.println(c9);

        //只要元素类型与维度一样，就是同一个Class
        int[] i1 = new int[10];
        int[] i2 = new int[100];
        System.out.println(i1.getClass().hashCode());
        System.out.println(i2.getClass().hashCode());
    }
}
